/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-03-02
 * Time: 19:44
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        TreeNode1 root = binaryTree.creatTree1();
        System.out.print("层序遍历：");
        binaryTree.levelOrder(root);
        System.out.println();
//        TreeNode1 p = binaryTree.creatTree1();
//        TreeNode1 q = binaryTree.creatTree2();
//        System.out.println(binaryTree.isSameTree(p, q));
//        root = binaryTree.creatTree1();
        System.out.print("前序遍历：");
        binaryTree.preOrder(root);
//        System.out.print("\n中序遍历：");
//        binaryTree.inOrder(root);
//        System.out.print("\n后序遍历：");
//        binaryTree.postOrde(root);
//        System.out.println();
//        int ret = binaryTree.size(root);
//        System.out.println(ret);
//        System.out.println(binaryTree.getLeafNodeCount(root));
//
//        System.out.println(binaryTree.getKLevelNodeCount(root, 4));
//        System.out.println(binaryTree.getHeight(root));
//        System.out.println(binaryTree.find(root, 'H').val);
//        try {
//            System.out.println(binaryTree.find(root,'T').val);
//        }catch (NullPointerException e){
//            e.printStackTrace();
//            System.out.println("没有这个结点！");
//        }
        //System.out.println(binaryTree.isCompleteTree(root));
    }
}
